package com.zm.blog.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zm.blog.entity.Article;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 文章表 Mapper 接口
 */
public interface ArticleMapper extends BaseMapper<Article> {

    @Update("UPDATE article SET view_count = view_count + 1 WHERE id = #{id}")
    int updateViewCount(@Param("id") Integer id);

}
